package com.csnf.order.feign;

import com.csnf.order.feign.falldack.ProductFeignFalldack;
import com.csnf.pojo.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "service-product",fallback = ProductFeignFalldack.class)//指定调用的服务名称或 url
public interface ProductFeignClient {
    //获取商品信息
    @GetMapping("/product/getProductById") //指定请求方式，请求的资源url
    public Product getProductById(@RequestParam("id") Integer id);  //携带参数
}
